import { API_URL } from "../constants";
import type { IMaker, IRequestListParams, IResponseList } from "../types";
import request from "./request";

export function getMakerList(
  params: IRequestListParams<{ makerName?: string }>,
  token: string,
) {
  return request<IResponseList<{ rows: IMaker[] }>>(
    `${API_URL}/business/maker/list`,
    {
      params: params as Record<string, string>,
      headers: { Authorization: token },
    },
  );
}
